//
//  HTTPController.swift
//  doubandiantai
//
//  Created by 王海申 on 2017/8/2.
//  Copyright © 2017年 王海申. All rights reserved.
//

import UIKit

import Alamofire

class HTTPController:NSObject{
    
    
    
    var delegate:HttpProtocol?
    
    func onSearch(url:String){
        
        Alamofire.request(url).responseJSON { response in
            //debugPrint(response)
            
            if let json = response.result.value {
               
                
                self.delegate?.didReceiveResulets(resulets: json as AnyObject)
            }
        }

        
    }
}



protocol HttpProtocol {
    
    func didReceiveResulets(resulets:AnyObject)
    
    
}
